﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Public_Class_Library;
using Q.M.Finance.Application.IServices;
using Q.M.Finance.Domain.Entity;
using Q.M.Finance.Infrastruecure.IRepository;
using Q.M.Finance.Infrastruecure.Repository;
using Q.M.Sell.Doamin.Entity;

namespace Q.M.Finance.Write.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class Client_payer_informationWriteController : ControllerBase
    {
        private readonly IClient_payer_informationServices client_Payer_InformationServices;
        public Client_payer_informationWriteController(IClient_payer_informationServices client_Payer_InformationServices)
        {
            this.client_Payer_InformationServices = client_Payer_InformationServices;
        }
        /// <summary>
        /// 显示客户信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> GetpayerInfo()
        {
            var list=await client_Payer_InformationServices.GetpayerInfo();
            return Ok(list);
        }
        /// <summary>
        /// 反填客户信息
        /// </summary>
        /// <param name="customerid"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> FindpayerInfo(int customerid)
        {
            var list = await client_Payer_InformationServices.FindpayerInfo(customerid);
            return Ok(list);
        }
       

    }
}
